<?php

declare(strict_types=1);

namespace App\CustHub\Controller\Admin;

use App\CustHub\Controller\BaseController;
use App\CustHub\Service\ChGetSeatOrderService;
use Hyperf\Di\Annotation\Inject;
use Hyperf\HttpServer\Annotation\Controller;
use Hyperf\HttpServer\Annotation\GetMapping;
use Mine\Annotation\Auth;
use Mine\Annotation\Permission;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
use Psr\Http\Message\ResponseInterface;

#[Controller(prefix: "ch/admin/chGetSeatOrder"),auth]
class ChGetSeatOrderController extends BaseController
{
    #[Inject]
    protected ChGetSeatOrderService $service;

    /**
     * 获取席位订单列表
     * @return ResponseInterface
     * @throws ContainerExceptionInterface
     * @throws NotFoundExceptionInterface
     */
    #[GetMapping('index'),Permission("ch:admin:chGetSeatOrder:getSeatOrder")]
    public function getSeatOrder(): ResponseInterface
    {
        return $this->success($this->service->getSeatOrder($this->request->all()));
    }
}